1. Field of the Invention
The present invention pertains to assigning a unique packet identifier to SNMP (simplified network management protocol) network management messages, so that each SNMP message transmitted by a managing client over a local or wide area network has a unique packet identifier.
2. Description of the Related Art
SNMP (simplified network management protocol) has become an industry-accepted standard for managing devices on a local or wide area network. According to this protocol, SNMP management messages are transmitted over the network from a managing client to a managed device. The managed device responds with a suitable network message such as an acknowledgement message. Depending on the response from the managed device, or the absence thereof, the managing client can determine what additional management steps must be taken.
In order to determine which SNMP message a managed device is responding to, and otherwise to identify the SNMP message, the managing client assigns a packet ID to each SNMP message. Optimally, the packet ID is a unique number so that the managing client can distinguish one SNMP message from another. Heretofore, however, the process of assigning a unique SNMP packet identifier has been difficult.
For example, according to one conventional technique for assigning packet identifiers, the managing client simply increments a counter when a new SNMP message is being prepared, and uses the incremented counter as the packet identifier. Such a technique creates difficulties, however, when the counter rolls over, since packet identifiers might be duplicated. In such instances, there might still be valid SNMP packets outstanding, which will now be indistinguishable from newly-issued SNMP packets because of the duplicated packet ID.
The present invention addresses the foregoing difficulties by assigning packet IDs that are guaranteed to be unique. Specifically, although the invention might assign a packet ID that has previously been used, the packet ID is only re-used if the original SNMP management client is xe2x80x9csafely gone xe2x80x9d.
The invention is premised on the inventor""s recognition that each SNMP message for any one managing client is stored at a physical memory address (which might correspond to real memory or to virtual memory, depending on disk swapping techniques in place) with the physical memory address being unique for each SNMP message for any one managing client. Therefore, if the physical memory address for a second SNMP management message matches that of a first SNMP management message, and is thus being re-used, the first SNMP message must be safely gone.
Thus, in one aspect, the invention assigns SNMP packet identifiers for an SNMP message in correspondence to the physical memory address at which the SNMP message is stored. Preferably, the packet ID corresponds to the starting address for the SNMP message, but other addresses such as the second or the last address of the SNMP message can also be used, so long as the precise address being used is applied with consistency. The SNMP message is then packaged into a network message by including the SNMP packet identifier, the port address of the managing client, and the destination address of the managed device. The network message is then transmitted.
Thereafter, upon receipt of a response from the managed device, the SNMP packet identifier is guaranteed to be unique for each SNMP management client. Specifically, while it is possible for different SNMP management clients to issue SNMP messages having the same packet identifier, each such SNMP management client will have a different port address, thereby guaranteeing that the response will be received by the proper client. At the same time, since it is the client who knows which SNMP messages are still outstanding, the client need only ensure that each SNMP message that is still outstanding remain in memory until it has been properly responded to, or is otherwise no longer needed. Once a response has been received, or the message is otherwise no longer needed, the SNMP management client can delete a message from memory and re-use the same physical memory address. Re-use of the same memory address will not cause collision with prior packet identifiers, since the prior messages are guaranteed to be safely gone.
This brief summary has been provided so that the nature of the invention may be understood quickly. A more complete understanding of the invention can be obtained by reference to the following detailed description of the preferred embodiment thereof in connection with the attached drawings.